package copyengine.ui.component.scrollablePanel.list
{
    import copyengine.ui.component.scrollablePanel.common.layout.ICEScrollableLayout;
    import copyengine.ui.component.scrollablePanel.element.list.displayContainerSharePool.ICEListElementDisplayContainerSharePool;
    import copyengine.ui.component.scrollablePanel.scrollPanel.CEScrollPanel;

    import starling.display.DisplayObjectContainer;

    public class CEList extends CEScrollPanel
    {
        private var mElementDisplayContainerSharePool:ICEListElementDisplayContainerSharePool;

        public function CEList(_container:DisplayObjectContainer,
                               _layout:ICEScrollableLayout,
                               _direction:int,
                               _isLockInView:Boolean,
                               _viewportWidth:int, _viewportHeight:int,
                               _elementDisplayContainerSharePool:ICEListElementDisplayContainerSharePool) {
            mElementDisplayContainerSharePool = _elementDisplayContainerSharePool;
            super(_container, _layout, _direction, _isLockInView, _viewportWidth, _viewportHeight);
        }

        override protected function doDispose():void {
            mElementDisplayContainerSharePool.dispose();
            mElementDisplayContainerSharePool = null;
            super.doDispose();
        }

        public function get elementDisplayContainerSharePool():ICEListElementDisplayContainerSharePool {return mElementDisplayContainerSharePool;}

    }
}
